-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add save on idle 🚀 #5303
Add save on idle 🚀 #5303
Conversation
There was some discussion on the PR that added auto-save on focus loss: #3178 (comment) This could be added to the auto-save = ["focus-lost", "idle"] I'm also thinking that the idle-timeout is too short for this - it will save very aggressively. An auto-save timer should probably have a much longer duration like 10+ seconds |
Yeah, I think having a separate timer and all relevant configuration being done in Though I'm not sure what should be the behavior in case of a boolean value for Perhaps, |
What was the reason why this was dropped? This seems like a good change... |
Author probably lost interest. Either way I do think this needs a seperate timers, piling more on idle tineout is not a good idea and idle-timeout is also way to short for autosave. I agree with @the-mikedavis this needs atleast a 10s timer. Probably even longer. The config also needs to be changed as mentioned above. For the timer this should probably be based on #8021 which makes it really easy to add new event based timers. In this case the timer should be reset whenever a document revision is created (saving in insert mode is broken so that should not.happen there). |
The implementation was shotty at best, I'm looking to pick this back up once I have some time on hand. |
I personally feel that it would be great to have a shorter timer, of maybe a second or two, for the purpose of code diagnostics; though this will of course vary a lot. Regardless, given this variation, I think it would definitely make sense to have it be a configuration option, with a reasonable default of 10+ s. |
auto-save
like feature on idle timer trigger events.rust-analyzer
as most diagnostics are only refreshed on file save.idle-save
in the[editor]
section of the config file,false
by default.Video showcasing the feature with
rust-analyzer
language server (idle-timeout
is set to0
)2022-12-27.01-48-24.mp4